home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Install_Startup21 0.1 (15.08.97) by OLIVERES 'Moonchild' Jean-Marc
-
- ; Définition des variables de texte
-
- ; Français
-
- (procedure P_français (
- (set MSG_DESTINATION1 (cat "Où désirez-vous installer Startup-Selector 2.1 ?\n"
- "Il est recommandé de sélectionner le répertoire C:\n"
- "Un tiroir \"Sounds\" y sera créé pour les sons."))
- (set MSG_DESTINATION2 "Où désirez-vous installer StartupSelectorPrefs ?\n")
- (set MSG_CATALOG "Quel catalogue désirez-vous installer ?")
- (set MSG_MAKEDIR1 "Création du répertoire \"S:Start\" pour vos scripts.")
- (set MSG_WHEREDOC "Où dois-je mettre la documentation?")
- (set MSG_THANKS "\n\nMerci d'avoir installé %s.")
- (set MSG_SCRIPTREP "Où voulez-vous le répertoire de vos scripts ?")
- (set MSG_ELSEWHERE "Ailleurs")
- (set MSG_EXPLAIN (cat "Maintenant, je vais copier la Startup-Sequence\n"
- "originale dans le répertoire des scripts, puis\n"
- "je vais renommer la Startup-Sequence originale\n"
- "en 'Startup-Sequence.org'. Enfin, je vais créer\n"
- "une startup-sequence réduite."))
- (set MSG_EXPLAIN2 (cat "Il ne vous reste plus qu'à supprimer la commande\n"
- "'Setpatch' de votre Startup-Sequence originale qui\n"
- "se trouve dans votre répertoire de scripts.\n\n"
- "Si 'StartupSelector' n'est pas installé dans votre\n"
- "PATH, alors éditez la nouvelle Startup-Sequence\n"
- "afin de faire correspondre le chemin d'accès."))
- ))
-
- ; English
-
- (procedure P_english (
- (set MSG_DESTINATION1 (cat "Where would you like Startup-Selector 2.1 to be installed ?\n"
- "(It is recommanded to put it in your \"C:\" directory)\n"
- "A drawer \"Sounds\" will be created for the sounds."))
- (set MSG_DESTINATION2 "Where would you like StartupSelectorPrefs to be installed ?\n")
- (set MSG_CATALOG "Wich catalog do you wish to install ?")
- (set MSG_MAKEDIR1 "Making the \"S:Start\" directory for your scripts.")
- (set MSG_WHEREDOC "Where shall I put the documentation?")
- (set MSG_THANKS "\n\nThanks for installing %s.")
- (set MSG_SCRIPTREP "Where shall I create the script's directory ?")
- (set MSG_ELSEWHERE "Elsewhere")
- (set MSG_EXPLAIN (cat "Now I'm going to copy the original\n"
- "Startup-Sequence file in the script's directory.\n"
- "Then I'm going to rename the original\n"
- "Startup-Sequence file to 'Startup-Sequence.org'.\n"
- "Last, I'll create a reduced startup-sequence file."))
- (set MSG_EXPLAIN2 (cat "Now you just have to delete the 'Setpatch command\n"
- "from your original Startup-Sequence wich is in\n"
- "your script's directory.\n\n"
- "If 'StartupSelector' isn't installed in your PATH,\n"
- "then edit the new Startup-Sequence file to have\n"
- "the good path."))
- ))
-
-
- ; Envoie à la bonne procédure en fonction du langage choisi (icon)
-
- (if (= @language "english") (P_english))
- (if (= @language "français") (P_français))
-
- ; Définition du répertoire de destination de la doc
-
- (set docdir "HELP:")
-
- ; Propose un choix dans la destination du programme principal
- ; Puis copie le fichier dans la destination
- ; Puis copie du répertoire pour les sons au même endroit
-
- (set destination
- (askdir
- (prompt MSG_DESTINATION1)
- (help @askdir-help)
- (default "C:")
- )
- )
-
- (set @default-dest destination)
-
- (copyfiles (help @copyfiles-help)
- (source "/StartupSelector")
- (dest @default-dest)
- )
-
- (if (= @language "français")
- (copyfiles (help @copyfiles-help)
- (source "/")
- (choices "sounds")
- (dest @default-dest)
- )
- (copyfiles (help @copyfiles-help)
- (source "/")
- (choices "sounds")
- (dest @default-dest)
- )
- )
-
- ; Propose un choix dans la destination du programme de preférences
- ; Puis copie le fichier dans la destination
-
- (set destination
- (askdir
- (prompt MSG_DESTINATION2)
- (help @askdir-help)
- (default "SYS:Prefs")
- )
- )
-
- (set prefdir destination)
-
- (copyfiles (help @copyfiles-help)
- (source "/Prefs/StartupSelectorPrefs")
- (dest prefdir)
- )
-
- (copyfiles (help @copyfiles-help)
- (source "/Prefs/StartupSelectorPrefs.info")
- (dest prefdir)
- )
-
- ; Copie du fichier de preférences dans S:
-
- (set prefdir "S:")
-
- (copyfiles (help @copyfiles-help)
- (source "/Prefs/StartupSelector.prefs")
- (dest prefdir)
- )
-
- ; Propose un choix dans la destination de la documentation
- ; Puis copie le fichier dans la destination en fonction du langage
-
- (set docdir
- (askdir (prompt MSG_WHEREDOC)
- (help @askdir-help)
- (default docdir)
- )
- )
-
- (if (= @language "français")
- (copyfiles (help @copyfiles-help)
- (source "/Docs/Français/StartupSelector.Guide")
- (dest docdir)
- (infos)
- (optional "nofail")
- )
- (copyfiles (help @copyfiles-help)
- (source "/Docs/English/StartupSelector.Guide")
- (dest docdir)
- (infos)
- (optional "nofail")
- )
- )
-
- ; Propose un choix entre S:Start/ et ailleurs pour le répertoire des scripts
- ; Puis création du répertoire choisi
-
- (set choice
- (askchoice (prompt MSG_SCRIPTREP)
- (help @askchoice-help)
- (choices "S:Start/" MSG_ELSEWHERE)
- )
- )
-
- (if (= choice 0)
- (set scriptdir "S:")
- (set scriptdir
- (askdir (prompt MSG_SCRIPTREP)
- (help @askdir-help)
- (default "SYS:")
- )
- )
- )
-
- (makedir (tackon scriptdir "Start")
- )
-
- ; Propose un choix parmis les catalogues
- ; Puis copie le catalogue choisi
-
- (if (exists "LOCALE:" (noreq))
- (
- (set #catalogs
- (askoptions (prompt MSG_CATALOG)
- (help @askoptions-help)
- (choices "français" "italiano" "español")
- (default #catalogs)
- )
- )
- (if (BITAND #catalogs %001)
- (copyfiles (help @copyfiles-help)
- (source "/Catalogs/français/")
- (dest "LOCALE:Catalogs/français")
- (all)
- (optional "nofail")
- )
- )
- (if (BITAND #catalogs %010)
- (copyfiles (help @copyfiles-help)
- (source "/Catalogs/italiano/Startupselector.catalog")
- (dest "LOCALE:Catalogs/italiano")
- (all)
- (optional "nofail")
- )
- )
- (if (BITAND #catalogs %001)
- (copyfiles (help @copyfiles-help)
- (source "/Catalogs/español/Startupselector.catalog")
- (dest "LOCALE:Catalogs/español")
- (all)
- (optional "nofail")
- )
- )
-
- )
- )
-
- ; Copie la Startup-Sequence originale dans le répertoire des scripts
- ; Renomme la Startup-Sequence originale en 'Startup-Sequence.org'
- ; Création d'une startup-sequence réduite
- ; Demande de supprimer la ligne 'C:Setpatch' dans celle copiée
-
- (message MSG_EXPLAIN
- )
-
- (set destscript (tackon scriptdir "Start")
- )
-
- (copyfiles (help @copyfiles-help)
- (source "SYS:S/Startup-Sequence")
- (dest destscript)
- )
-
- (rename "SYS:S/Startup-Sequence" "SYS:S/Startup-Sequence.org"
- )
-
- (copyfiles (help @copyfiles-help)
- (source "/Install/Startup-Sequence.reduced")
- (dest "SYS:S/")
- (newname "Startup-Sequence")
- )
-
- (message MSG_EXPLAIN2
- )
-
- (exit (MSG_THANKS @app-name)
- )
-